<%@page import="javax.portlet.WindowState"%>
<%@include file="/html/library/init.jsp"%>

<%@page import="com.liferay.portal.kernel.util.WebKeys"%>
<%@page import="com.liferay.portal.kernel.dao.search.ResultRow"%>
<%@page import="com.liferay.portal.kernel.portlet.LiferayWindowState"%>

<%@ taglib uri="http://liferay.com/tld/security" 
			prefix="liferay-security" %>
<%       
	ResultRow row = (ResultRow) 
       	request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);		
	LMSBook book = (LMSBook) row.getObject();
	
	PortletURL editBookURL = renderResponse.createRenderURL(); 
	editBookURL.setParameter("bookId", Long.toString(book.getBookId()));
	editBookURL.setParameter("jspPage", LibraryConstants.PAGE_UPDATE);
	
	PortletURL deleteBookURL = renderResponse.createActionURL();
	deleteBookURL.setParameter(ActionRequest.ACTION_NAME,LibraryConstants.ACTION_DELETE_BOOK);
	deleteBookURL.setParameter("redirectURL", themeDisplay.getURLCurrent());
	deleteBookURL.setParameter("bookId",String.valueOf(book.getBookId()));
	
%>

<liferay-ui:icon-menu>
		
	<liferay-ui:icon image="edit" message="Edit" url="<%= editBookURL.toString() %>" />
	<liferay-ui:icon image="delete" message="Delete" url="<%= deleteBookURL.toString() %>"/>
	
</liferay-ui:icon-menu>
